package com.wit.witmg.util;

/**
 * 枚举错误码
 */
public enum ErrorCode {

    ERR_0(0, "异常"),
    ERR_100(100, "接口重复请求"),
    ERR_101(101, "非法请求"),
    ERR_102(102, "接口请求超时"),
    ERR_103(103, "接口请求签名错误"),
    ERR_200(200, "参数错误"),
    ERR_201(201, "请先添加库存表数据"),
    ERR_300(300, "没有权限"),
    ERR_301(301, "店铺到期"),
    ERR_302(302, "没有该员工"),
    ERR_303(303, "数据已存在"),
    ERR_304(304, "参数数据有误"),
    ERR_305(305, "你已被拉黑"),
    ERR_306(306, "未关注店铺"),
    ERR_307(307, "价格有误"),
    ERR_308(308, "商品已删除或下架"),
    ERR_309(309, "库存不足"),
    ERR_310(310, "该店铺已休店"),
    ERR_311(311, "退款数量有误"),
    ERR_312(312, "轮播不能超过6张"),
    ERR_313(313, "数据不存在"),
    ERR_314(314, "已到顶部"),
    ERR_315(315, "已到底部"),
    ERR_316(316, "订单已关闭"),
    ERR_317(317, "订单已支付"),
    ERR_318(318, "未审核"),
    ERR_319(319, "订单该状态下无法操作"),
    ERR_320(320, "售后数量错误"),
    ERR_321(321, "自己不能拉黑自己"),
    ERR_322(322, "商品推荐数量已到上限"),
    ERR_323(323, "店铺需要审核，请先登录"),
    ERR_324(324, "店铺支付功能未开通"),
    ERR_325(325, "商品编码不能为空"),
    ERR_326(326, "只有待发货状态才可以生成订单二维码"),
    ERR_327(327, "二维码数据有误"),
    ERR_328(328, "店铺信息不完善无法生成小程序码"),
    ERR_329(329, "购物车加购失败"),
    ERR_330(330, "该用户已是其他店铺的员工"),
    ERR_331(331, "数据库操作失败"),
    ERR_332(332, "请先添加活动商品"),
    ERR_333(333, "邮费有误"),
    ERR_334(334, "已超出限购数量，无法购买"),
    ERR_335(335, "该商品已在待支付订单"),
    ERR_336(336, "该活动商品已过期"),
    ERR_337(337, "该运费模板下存在商品，无法删除"),
    ERR_338(338, "还未再其他平台登录，请通过手机号登录"),
    ERR_339(339, "无需重复申请入驻"),
    ERR_340(340, "还未绑定客服"),
    ERR_341(341, "已是该店的员工"),
    ERR_342(342, "手机号码不一致"),
    ERR_343(343, "不能重复绑定"),
    ERR_344(344, "代理商无法绑定"),
    ERR_345(345, "请先到小程序登录"),
    ERR_346(346, "身份证无法识别"),
    ERR_347(347, "银行卡认证失败"),
    ERR_348(348, "手机号实名认证失败"),
    ERR_349(349, "半年内只允许修改一次"),
    ERR_350(350, "自己无需绑定自己"),
    ERR_400(400, "token无效"),
    ERR_401(401, "账号或密码错误"),
    ERR_404(404, "无效地址"),
    ERR_405(405, "请先通过手机号登录"),
    ERR_406(406, "#02"),//秘钥错误
    ERR_407(407, "该时间段还有未完成的轮循任务"),//秘钥错误
    ERR_500(500, "服务内部异常"),
    ERR_501(501, "空指针异常"),
    ERR_502(502, "业务异常"),
    ERR_503(503, "活动太火爆，稍后再试"),
    ERR_504(504, "数据库操作失败"),
    ERR_600(600, "获取assessToken失败"),
    ERR_601(601, "获取openid失败"),
    ERR_603(603, "代码提交成功，微信平台审核失败"),
    ERR_602(602, "获取微信手机号失败"),
    ERR_604(604, "请先授权"),
    ERR_605(605, "注册小程序失败"),
    ERR_606(606, "支付异常"),
    ERR_607(607, "退款异常"),
    ERR_608(608, "获取小程序码失败，稍后再试"),
    ERR_609(609, "请先配置商铺数据"),
    ERR_610(610, "获取UID失败"),
    ERR_611(611, "请先开通直播插件"),
    ;

    public static final Integer MESSAGE_PARAM_MISSING = 400;

    /**
     * 错误码
     */
    private Integer code;
    /**
     * 错误描述
     */
    private String msg;

    public Integer getCode() {
        return this.code;
    }

    public String getMsg() {
        return this.msg;
    }

    /**
     * 构造函数
     *
     * @param code
     * @param msg
     */
    ErrorCode(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }
}
